


waitUntil{	ServerInitEnds };
[player] execVM "AgentBriefing.sqf";

sleep 2;

IsIntoACivil=false;

CurrentCivil=objnull;

execVM "C_PlayerPositions.sqf";

CivilsDetectingHumans=[];

"I'AM AN AGENT" call debug;


{ // launch civil detection script foreach human

	if( ( (side _x) == resistance) && (_x != TankPlayer) ) then{
		[_x] execVM "civilDetection.sqf";
	};
	
}forEach allUnits;

// // create respawn trigger
RespawnTrigger=createTrigger[ "EmptyDetector",[0,0,0]]; 
RespawnTrigger setTriggerArea[20,20,0,false];
RespawnTrigger setTriggerActivation["CIV","PRESENT",true];
RespawnTrigger setTriggerStatements["this", "", ""]; 

// wait for the player to open the map
//waitUntil{ visibleMap };

onMapSingleClick "[_pos,_units] ExecVM 'AgentMapRespawn.sqf'; true;";

player ExecVM "AgentKilled.sqf";

_AgentKilled= player addEventHandler ["killed", {_this ExecVM "AgentKilled.sqf";}];

/* _hndl = ppEffectCreate ["ColorInversion", 1501];
_hndl ppEffectEnable true;
_hndl ppEffectAdjust [0.0, 1.0, 0.0];
_hndl ppEffectCommit 0;
sleep 10;
ppEffectDestroy _hndl; */


/* _civilPos=getMarkerPos "mTestCab";

_camera = "camera" camCreate [0,0,200];

_camera camSetPos [(_civilPos select 0),(_civilPos select 1),(_civilPos select 2)+300];
_camera camSetTarget getPos player;

_camera camSetFov 0.700;
_camera cameraEffect ["internal","back"];
_camera camCommit 0; */



